package com.night.aop;

import com.night.annotation.Component;

import java.lang.reflect.Method;

/**
 * @Author: chen yang
 * @Date: 2024/12/4 20:40
 */
@Component
public class CustomAroundHandler extends AroundInvocationHandlerAdapter {
    @Override
    public void before(Object proxy, Method method, Object[] args) {
        System.out.println("before method " + method.getName());
    }

    @Override
    public Object after(Object proxy, Object returnValue, Method method, Object[] args) {
        System.out.println("after method " + method.getName());
        return returnValue;
    }
}
